<?php
/*
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 00:33:05
 * @LastEditTime: 2023-08-27 09:19:48
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description: 工序
 */

namespace App\Models;

use App\Traits\CommonUserTrait;
use Illuminate\Support\Facades\App as AppCall;

class OpenCardDetailsParameterTesting extends BaseModel
    {

    use CommonUserTrait;
    public $timestamps = true;
    public $table = "sys_opencard_parameter_testing";
    protected $guarded = [];
    protected $casts = [];

    public function open_card()
        {
        return $this->belongsTo(OpenCardDetails::class);
        }
    public function testor()
        {
        return $this->belongsTo(Employee::class);
        }
    public function status()
        {
        return $this->belongsTo(Dic::class, "status_id", "key")->where(function ($q)
            {
            $q->where("code", 'checkResult');
            });
        }
    }
